<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.util.List" %>
<%@ page import="com.google.appengine.api.users.User" %>
<%@ page import="com.google.appengine.api.users.UserService" %>
<%@ page import="com.google.appengine.api.users.UserServiceFactory" %>
<%@ page import="com.google.appengine.api.datastore.DatastoreServiceFactory" %>
<%@ page import="com.google.appengine.api.datastore.DatastoreService" %>
<%@ page import="com.google.appengine.api.datastore.Query" %>
<%@ page import="com.google.appengine.api.datastore.Entity" %>
<%@ page import="com.google.appengine.api.datastore.FetchOptions" %>
<%@ page import="com.google.appengine.api.datastore.Key" %>
<%@ page import="com.google.appengine.api.datastore.KeyFactory" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<jsp:useBean id="mybean" class="user.UserData" scope="session"/> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
<h1>dupa</h1>
<h1>${mybean.email}</h1>


<h1><jsp:getProperty name="mybean" property="second_name"/> Picza</h1>

<%
DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
Key guestbookKey = KeyFactory.createKey("Uzytkownik", "Uzytkownik");
// Run an ancestor query to ensure we see the most up-to-date
// view of the Greetings belonging to the selected Guestbook.
Query query = new Query("Uzytkownik", guestbookKey);
List<Entity> greetings = datastore.prepare(query).asList(FetchOptions.Builder.withLimit(25));

for (Entity greeting : greetings) {
    pageContext.setAttribute("greeting_content",
                             greeting.getProperty("first_name"));
    pageContext.setAttribute("greeting_conten",
            greeting.getProperty("password"));
   
    %>
    <blockquote>${fn:escapeXml(greeting_content)}  ${fn:escapeXml(greeting_conten)}</blockquote>
    
    <%
}
    %>
    


</body>
</html>